<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddWxSessionKeyToUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            //
            $table->string("wx_mini_session_key")->nullable()->comment("微信小程序端的session_key");
            $table->string("wx_web_session_key")->nullable()->comment("微信公众号的session_key");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            //
            $table->dropColumn('wx_mini_session_key');
            $table->dropColumn("wx_web_session_key");
        });
    }
}
